In this set of exercises, we clone and work on the GitHub repository you have created in the previous session.
In order to do the following exercises, you should have gone through the steps described in the setup information for the workshop. Specifically, you should…
Git via RStudioHTTPS for GitHubGit, enter the URL of the GitHub repository, and
choose a location where to store the project on your local machine. As
we will start working on the project right away, also check “Open in new
session”.
Git tab. To make extra
sure that everything worked, let’s check the Git status of
our project via the Terminal in RStudio.
Terminal in
RStudio uses via Tools -> Global Options
-> Terminal. If you use Windows, you should choose
Git Bash (which you should have installed with
Git for Windows).
git status
Now that the project is set up and in sync with the remote
repository, we can start working on it. Modify the README file (just
add, remove or edit a few words). If you have not already done so, add
(stage & commit) the R Markdown report (and its
resulting output) you generated yesterday to your
repository/project.
Git.
Git tab in RStudio and their status will be
indicated as modified (M) or untracked (??).
Git tab.
Git tab in RStudio, write a commit message in
the menu that opens up, and then click the Push button in the
same menu.
You can edit the README via the small pen icon next displayed above the content of your README file on the website of your GitHub repository.
Remember that if you edit a file directly via the GitHub web interface, you also need to make a commit (and add a commit message).Git tab in RStudio to update your
local project.